<?php if (has_slot('buttons')): ?>
  <?php include_slot('buttons') ?>
<?php endif; ?>

<?php if ($buttons['add'] && $sf_user->hasPermission(sprintf('@%s_nuevo', $uClass))): ?>
  <?php if(isset($object)): ?>
    <td><?php echo div_button_to('Agregar', sprintf('@%s_nuevo?parent_slug='.$object->getSlug(), $uClass), array('class' => 'button button_small')) ?></td>
  <?php else: ?>
    <td><?php echo div_button_to('Agregar', sprintf('@%s_nuevo', $uClass), array('class' => 'button button_small')) ?></td>
  <?php endif ?>
<?php endif; ?>

<?php if ($buttons['edit'] && $sf_user->hasPermission(sprintf('@%s_edit', $uClass))): ?>
  <td><?php echo div_button_to_get_url('Editar', sprintf('@%s_editar?slug=slug', $uClass), array('name_url' => $uClass.'_name_url=js=v=e'), array('class' => 'button button_small')) ?></td>
<?php endif; ?>

<?php if ($buttons['delete'] && $sf_user->hasPermission(sprintf('@%s_delete', $uClass))): ?>
  <td><?php echo div_button_to_get_url('Eliminar', sprintf('@%s_eliminar?slug=slug', $uClass), array('name_url' => $uClass.'_name_url=js=v=d'), array('class' => 'button button_small')) ?></td>
<?php endif; ?>
